import { IPlank } from '@/types';

const log = console.log.bind(null, '[from-out]');

interface Params {
  orderId: string;
  mergeId: string;
  plankId: string;
  plank: IPlank;
}
export async function getParams(): Promise<Partial<Params>> {
  const json = await Manycore.Miniapp.getUploadedDataAsync().catch(
    (err: Error) => {
      log(err.message);
      return JSON.stringify({});
    },
  );
  const obj = JSON.parse(json);
  log(obj);
  return obj;
}
